/**
 * 
 */
package org.statewalker.parser.wiki.tokenizer.base;

import org.statewalker.tokenizer.stream.ICharStream.Pointer;
import org.statewalker.validator.IParseKey;
import org.statewalker.validator.impl.ParseToken;

/**
 * @author kotelnikov
 */
public class StreamToken extends ParseToken {

    private final Pointer fBegin;

    private final Pointer fEnd;

    private final String fToken;

    /**
     * @param key
     * @param open
     */
    public StreamToken(
        IParseKey key,
        boolean open,
        Pointer begin,
        Pointer end,
        String str) {
        super(key, open);
        fBegin = begin;
        fEnd = end;
        fToken = str;
    }

    /**
     * @param key
     */
    public StreamToken(IParseKey key, Pointer begin, Pointer end, String str) {
        this(key, true, begin, end, str);
    }

    /**
     * @return the begin
     */
    public Pointer getBegin() {
        return fBegin;
    }

    /**
     * @return the end
     */
    public Pointer getEnd() {
        return fEnd;
    }

    /**
     * @return the token
     */
    public String getToken() {
        return fToken;
    }

}
